<div class="layuimini-container layuimini-page-anim">
    <div class="layuimini-main">
        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
                <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add" href="asdasdsd" > 添加 </button>
            </div>
        </script>

        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

        <script type="text/html" id="currentTableBar">
			<a class="layui-btn  layui-btn-xs" lay-event="authorization">授权</a>
            <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
        </script>

    </div>
</div>
<script>
	
    layui.use(['form', 'table','miniPage','element','hsw'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            miniPage = layui.miniPage;
			hsw = layui.hsw;
		hsw.hsw_table('currentTableId', HSW_API_MANAGE_ROLE_LIST, [
        				{field: 'pid', width: 200, title: '主键ID'},
        				{field: 'name', width: 200, title: '角色名称', sort: true},
        				{field: 'code', title: '角色编码', minWidth: 150},
        	            {field: 'create_time', width: 180, title: '创建时间', sort: true},
        	            {field: 'last_update_time', width: 180, title: '最后修改时间'},
        	            {field: 'remark', width: 300, title: '备注', sort: true},
        	            {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}
        	        ],false);
		hsw.hsw_search('data-search-btn','currentTableId');
		
		hsw.hsw_table_tool('currentTableFilter','currentTableId',
			{add:{
				title:'角色新增',
				html:'page/manage/role/add.html'
			},edit:{
				title:'角色修改',
				html:'page/manage/role/edit.html'
			},del:{
				url:HSW_API_MANAGE_ROLE_DEL
			},info:{
				url:HSW_API_MANAGE_ROLE_INFO
			},authorization:{
				title:'角色授权',
				html:'page/manage/role/auth.html',
				url:HSW_API_MANAGE_ROLE_PERMISSION_INFO
			}});      
    });
</script>